package com.chat.admin.domain.DTO.EDIT;

import com.chat.admin.annotate.IsNumeric;
import com.chat.admin.annotate.ValidAccount;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class EditUserDTO {
    /**
     * id
     */
    @NotNull(message = "id不能为空")
    private Long id;
    /**
     * 账号
     */
    @IsNumeric(message = "账号只能是数字")
    @ValidAccount(min = 6, max = 11, message = "账号长度必须在6到11之间")
    private String account;
    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @Size(min = 1, max = 20, message = "用户名长度必须在1到20之间")
    private String username;
    /**
     * 年龄
     */
    private Integer age;
    /**
     * 性别
     */
    private String sex;
    /**
     * 邮箱
     */
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式错误")
    private String email;
    /**
     * 电话
     */
    private String phone;
    /**
     * 头像
     */
    private String avatar;
}
